home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 53 / 053.d81 / roman numeral (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  19KB  |  455 lines

  1. 150 p1=53280:p2=53281:print"[147]":pokep1,1:pokep2,1:poke53269,255:poke53269,0
  2. 170 printchr$(142)"           one moment please..."
  3. 180 a=646:d=1:dimt$(100),wq(45):goto5530
  4. 190 pokev+41,1:pokev+29,4:poke53269,peek(53269)or4:poke53269,0
  5. 200 pokev+39,1:pokev+29,1:poke53269,peek(53269)or1:poke53269,0:fort=41to46:pokev+t,2:nextt
  6. 220 v1=10:w1=17:u1=33:l1=134:a1=10:c1=1200
  7. 225 jj=1
  8. 226 goto 270
  9. 260 poke49,peek(47):poke50,peek(48)
  10. 270 w=0:print"[147]":pokep1,0:pokep2,0:printtab(9)"[158] roman numeral teacher "
  11. 280 printtab(13)"[153](c) mcmlxxxviii":ifd=1thengosub4050:d=0
  12. 290 ifj<>1thenv1=12:w1=17:u1=50:l1=58:a1=10:c1=1350:gosub5240
  13. 300 j=0:v=0:v1=8:print"":printtab(5)"[154]select one letter: (l/r/q/e)[158]"
  14. 320 printtab(5)"l[146] learning roman numerals":printtab(5)"r[146] roman numeral examples":kk=0
  15. 340 printtab(5)"q[146] roman numerals quiz":printtab(5)"e[146] end[154]":print:print:iffs>0thengosub470
  16. 370 v1=10:w1=17:u1=67:l1=12:a1=10:c1=900:gosub5240
  17. 380 w1=17:c1=1000:u1=100:l1=117:a1=15
  18. 390 getd$:ifd$="r"then850
  19. 410 ifd$="l"thenprint""tab(5)"                 ":goto1090
  20. 420 ifd$="q"theng=0:goto3150
  21. 430 ifd$="e"thengosub7000
  22. 450 goto390
  23. 460 :
  24. 470 fort=1to250:nextt:m$="quiz tally:":n$="[157] right out of":p$="[157] tries":printtab(2)"";
  25. 490 formm=1to13:printmid$(m$,mm,1);:next:printft;:fornn=1to14
  26. 500 printmid$(n$,nn,1);:next:printfs;:forps=1to7:printmid$(p$,ps,1);:next:print:mm=0:nn=0:pp=0:return
  27. 540 poke53248+29,2:poke53269,peek(53269)or2:printtab(5)"[158]    right! ";
  28. 560 ifb=1orb=3thenprinta$" ="x:goto580
  29. 570 print"[157]"x"= "a$;
  30. 580 print"[145][145][145][145][145][145]":poke781,19:sys59903:ct=0:ft=ft+1:fs=fs+1:cj=1:cp=1:gosub5320
  31. 600 z=z+1:zz=zz+1:fort=1to1000:nextt:g=0:poke53269,peek(53269)and(253)
  32. 610 cc=1:pp=1:rr=0:gosub4650:poke781,22:sys59903:poke214,17:print:poke211,0
  33. 630 print"[153]"z"[157] right out of"zz"  ";:printint((z/zz)*100)"[157]%  ":return
  34. 670 print"[147]":print" important point!":c1=1000:w1=17:a1=15:gosub5240
  35. 690 print" one more thing before going back to     the main menu..."
  36. 700 print" if you put a bar over a roman-numeral"
  37. 710 print" letter, the value of that letter":print" is multiplied by 1000."
  38. 720 printtab(7)"[210]"tab(23)"[210]":print" like: x=10,000...or...m=1,000,000":print" usually only"
  39. 750 print" the letters 'v', 'x' and 'm' are used":print" so..."
  40. 760 printtab(15)"[198]":printtab(15)"vmdclxvii":print" equals: 5000+1000+500+100+50+10+5+1+1"
  41. 780 printtab(17)"6667":print" none of these examples appear in quiz!"
  42. 800 printtab(7)"[156] for main menu, press 'm'";:ifk=1thenk=0
  43. 810 getm$:ifm$="m"thenj=1:return
  44. 820 goto810
  45. 850 pokep1,1:pokep2,1:gosub5240:a$="":aa=1:bb=3999
  46. 860 gosub3740:print" example":print" roman numeralstandard number"
  47. 890 print" "a$tab(22)x:ifv=1thenprinttab(9)"([158]subtraction needed)":v=0
  48. 900 poke214,20:print:poke211,1:print"want another example? press 'a'"
  49. 910 print" return to main menu?? press 'm'":jj=1:gosub990
  50. 930 getf$:iff$=""then930
  51. 940 iff$="a"thena$="":goto860
  52. 950 iff$="m"thenj=1:goto270
  53. 960 goto930
  54. 990 forr=54272to54295:poker,0:next:vl=54296:wf=54276:ad=54277:nh=54273:nl=54272
  55. 1010 pokevl,15:pokewf,33:pokead,10:pokenh,200:pokenl,243:ifjj=1thenforn=1to500:next:goto1030
  56. 1020 forn=1to1500:next
  57. 1030 pokenh,0:pokenl,0:pokead,0:ifjj=1thenjj=0:return
  58. 1050 getg$:ifg$=chr$(13)thenreturn
  59. 1060 goto1050
  60. 1090 pokep1,7:pokep2,7:a1=15:print"[147]":gosub5240:print"[147]":print" roman numerals"
  61. 1110 print" roman numerals use letters instead of   regular numerals.";
  62. 1120 print" you should remember   that specific letters";
  63. 1130 print" are used for":print" specific standard (arabic) numbers."
  64. 1140 print"[156] press <return> for roman numeral chart[151]":gosub1050
  65. 1180 c1=100:gosub5240
  66. 1190 print"         roman           standard          ":ifk=1thenc1=100:gosub5240
  67. 1210 printtab(7)"[145]numeral           number":printtab(13)"i"tab(19)"="tab(25)"1"
  68. 1230 printtab(13)"v"tab(19)"="tab(25)"5":printtab(13)"x"tab(19)"="tab(25)"10":printtab(13)"l"tab(19)"="tab(25)"50"
  69. 1260 printtab(13)"c"tab(19)"="tab(25)"100":printtab(13)"d"tab(19)"="tab(25)"500"
  70. 1280 printtab(13)"m"tab(19)"="tab(25)"1000":ifv=1thenv=0:print"":goto1330
  71. 1290 print" by combining certain letters, you can   build the roman";
  72. 1300 print" numeral you need.";:print"..by   observing the letters you have, ";
  73. 1310 print"you     can easily change any roman numeral     into an everyday";
  74. 1320 print" arabic number."
  75. 1330 ifk=1ors=1thenprinttab(5)"[158]to return to previous page, 'p'"
  76. 1340 printtab(4)"to go to learning menu, press 'l'[144]";
  77. 1350 geth$:ifh$=""then1350
  78. 1360 ifh$="l"thens=0:v=0:goto1410
  79. 1370 ifh$="p"andk=1ors=1thenreturn
  80. 1380 goto1350
  81. 1410 c1=500:k1=0:gosub5240:pokep1,3:pokep2,3:print"[147]":print"[151] how to"
  82. 1440 print" select one: (1/2/3/4)"
  83. 1450 print" 1[146] change roman numerals to standard":k=0
  84. 1460 print" 2[146] change standard numbers to roman"
  85. 1470 print" 3[146] return to roman numeral chart":print" 4[146] return to main menu":d=0
  86. 1490 gett$:ift$=""then1490
  87. 1500 ift$="1"thenv=1:k$=" #1":gosub6340:goto1550
  88. 1510 ift$="2"thenk$=" #2":gosub6340:goto2250
  89. 1520 ift$="3"thenv=1:print"[147] roman numerals.":c1=200:gosub5240:goto1190
  90. 1530 ift$="4"thenj=1:goto270
  91. 1540 goto1490
  92. 1550 c1=100:gosub5240:ifk1=1thenk=1
  93. 1570 print"[147] how to "k$"[146]";:ifk=1thenprint" "
  94. 1580 ifk<>1thenprint" press <return> to continue"
  95. 1590 print" when changing from a roman numeral to   an ordinary";
  96. 1600 print" number, read your roman     numeral from right to left (_)":ifk<>1thengosub1050
  97. 1620 print" here's an example.":print" change lxxvi to an arabic numeral.":ifk<>1thengosub990
  98. 1640 print" read it backwards -- right to left (_)"
  99. 1650 print" since i=1, v=5, x=10, x=10, l=50..."
  100. 1660 print" (remember your roman numeral chart?)":ifk<>1thengosub990
  101. 1680 print" and since the numbers do not get"
  102. 1690 print" smaller: 1...5...10...10...50, just":ifk<>1thengosub990
  103. 1710 print" add 'em all up -- 1+5+10+10+50 = 76":printtab(15)"lxxvi=76":ifk<>1thengosub990
  104. 1730 print"[156] continue lesson? press <return>"
  105. 1740 print" go to roman numeral chart? press 'r'"
  106. 1750 print" how to"k$"[146]                           ":ifk<>1thenc1=100:gosub5240
  107. 1770 ifk=1thenk=0
  108. 1780 getj$:ifj$=chr$(13)then1820
  109. 1790 ifj$="r"thenv=1:k=1:print"[147] roman numerals.":gosub1190:goto1550
  110. 1800 goto1780
  111. 1810 jj=1:gosub990
  112. 1820 c1=100:gosub5240:ifk1=1thenk=1
  113. 1840 print"[147] how to"k$"[146]";:ifk=1thenprint" "
  114. 1850 ifk<>1thenprint" press <return> to continue"
  115. 1860 print" sometimes roman numerals get tricky.":ifk<>1thengosub1050
  116. 1880 print" look at this example.":print" change xciv to an arabic numeral."
  117. 1890 ifk<>1thengosub990
  118. 1900 print" as you read 'backwards' (_), notice"
  119. 1910 print" some numbers are smaller than ones"
  120. 1920 print" to their right: v=5, i=1, c=100, x=10"
  121. 1930 print" (forget your roman numeral chart?)":ifk<>1thengosub990
  122. 1950 print" if a letter of smaller value is on the"
  123. 1960 print" left";:print" of a larger one, you subtract";
  124. 1970 print" the  smaller one from the greater one.":ifk=1then2000
  125. 1990 gosub990
  126. 2000 ifk=1thenprint" *";:goto2020
  127. 2010 print" [158]*";
  128. 2020 print"subtract 'i' from 'v' ... (5-1)=4":ifk=1then2070
  129. 2040 poke214,6:print:poke211,10:print"[158][197][197]":gosub990
  130. 2060 ifk<>1thenpoke214,6:print:poke211,8:print"[158][197][197]  "
  131. 2070 ifk=1thenprint" *";:goto2090
  132. 2080 print" [158]*";
  133. 2090 print"subtract 'x' from 'c' ... (100-10)=90":ifk=1then2130
  134. 2110 gosub990:ifk<>1thenpoke214,6:print:poke211,8:print"    "
  135. 2130 print" now, add these answers up ... 90+4=94":printtab(16)"xciv=94":ifk<>1thengosub990
  136. 2160 print"[156] go to roman numeral chart? press 'r'":print" go to main menu? press 'm'"
  137. 2180 print" how to"k$"[146]                           ":ifk<>1thenc1=100:gosub5240
  138. 2200 ifk=1thenk=0
  139. 2210 geth$:ifh$="r"thenv=1:k=1:print"[147] roman numerals.":gosub1190:goto1820
  140. 2230 ifh$="m"thengosub670:goto270
  141. 2240 goto2210
  142. 2250 c1=100:gosub5240:ifk1=1thenk=1
  143. 2270 print"[147] how to"k$"[146]";:ifk=1thenprint" "
  144. 2280 ifk<>1thenprint" press <return> to continue"
  145. 2290 print" ar